<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ include file="/page/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/adapter/adapter-bootstrap.jsp" %>
</head>
<script type="text/javascript">

	function rowClickAfter(rowIndex,tradeId) {
		var  arrId = document.getElementsByName("check");
		arrId[rowIndex -1 ].checked=true;	
	}
	function viewTrade(){
		if(appType==null){
			alert("请选择一条记录！");
		}else{
			window.location.href="${ctx}/platform/appTypeDefineView?app_type="+appType;
		}
		
	}
</script>
<body>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">请输入查询条件</h3>
	</div>
<div class="panel-body">
	<form class="form-horizontal" role="form" action="${pageContext.request.contextPath }/platform/appTypeDefineList">
		<div class="form-group">
			<label class="col-xs-1 control-label"
				for="app_type">应用类型</label>
		<div class="col-xs-3"><input class="input-sm form-control" id="ds_username"
			type="text" /></div>
			<label class="col-xs-2 control-label" for="app_type_name">应用类型名称</label>
		<div class="col-xs-3"><input class="input-sm form-control" id="ds_password"
			type="text" /></div>
		<div class="col-xs-3">
			<button type="submit" class="btn btn-default btn-sm" >查询</button>  
		</div>
</div>
</form>
</div>
</div>
			<div class="op-btn">
				<input type="button" class="btn btn-default" onclick="viewTrade()" value="查看"/>
			</div>	
<macms:table dataListName="atdList" pageMode="true" >
	<macms:text id="app_type" label="应用类型"></macms:text>
	<macms:text id="app_type_name" label="应用类型名称"></macms:text>
	<macms:text id="svn_url" label="基础产品SVN地址"></macms:text>
	<macms:text id="svn_user" label="SVN用户"></macms:text>
	<macms:text id="app_console_dev" label="应用开发控制台"></macms:text>
	<macms:text id="app_console_scan" label="代码扫描控制台"></macms:text>
	<macms:text id="app_console_config" label="应用配置控制台"></macms:text>
	<macms:text id="app_console_itom" label="应用运维控制台"></macms:text>
	<macms:text id="app_console_monitor" label="应用监控控制台"></macms:text>
</macms:table>
	<script language="javascript">
	    var preRow = null;
	    var appType = null;
		$('tbody tr').bind('click', function() {
	
			var rowIndex = $(this).prevAll().length+1;
			if(rowIndex <1) return;
			
			if(preRow != null){
				preRow.removeClass("active");
			}
			$(this).addClass("active");
			preRow = $(this);
			appType=$(this).find("td").eq(1).text();
			// 行单击后事件(传入行号，页面标识)
			rowClickAfter(rowIndex,
					$(this).find("td").eq(1).text());
		});
	</script>
</body>
</html>
